When a data processing system fails to operate as designed, various analysis techniques may be used to identify a source of the failure. Generally, trace functions and breakpoint functions are implemented within the data processing system to aid in the isolation of failing circuitry and the correction of failing software programs.
Trace functions provide a means for allowing an external user to observe intermediate results of execution of a data processing operation. Trace functions generally provide a status of selected registers and memory included in the data processing system after each instruction or a predetermined group of instructions of a software program is executed by the data processing system. By reflecting the status of selected registers and memory, the trace function provides the external user with very detailed information about an internal programming model of a data processor or data processing system. With this information, many types of errors may be identified and subsequently corrected. Breakpoint functions also provide a method for identifying and isolating erroneous software code or faulty circuits in a data processing system. A breakpoint function is, in effect, where a preprogrammed event occurs causing a break in a software program. Data is then retrieved to determine a status of the software program. Like the trace function, the breakpoint function allows the external user to ascertain a status of each of the selected registers and memory such that data processing errors may be identified.
Both the trace function and the breakpoint function have been integrated in currently available data processing systems to provide the previously described isolation and identification capabilities. For example, the i960 Jx microprocessor, available from the Intel Corporation of Santa Clara, Calif., is an integrated circuit microprocessor which has internal breakpoint registers which generate trace events and trace faults. In the i960 Jx microprocessor, the internal breakpoint registers are dedicated to trapping on either instruction execution addresses or on the addresses of various types of data accesses. To use the tracing facility of the i960 Jx Microprocessor, software which utilizes the microprocessor must provide fault handling procedures or interface with a debugging monitor program. Software is also required to manipulate several registers and control bits to enable various tracing modes and to selectively enable or disable the tracing function.
Similarly, the 80486 microprocessor, also available from the Intel Corporation of Santa Clara, Calif., is an integrated circuit microprocessor which has internal breakpoint registers and is able to perform the trace function. In the 80486 microprocessor, a breakpoint instruction is implemented for use by internal software debugger devices, where internal software simply refers to software running on the data processing system. During general operation, a software debug program may implement the breakpoint instruction at all desired breakpoints which depend on a type of software code executed. The 80486 microprocessor also provides a mechanism for implementing a single step trap function which executes an interrupt after the trap routine is executed.
While the i960 Jx microprocessor and 80486 microprocessor integrate the breakpoint and trace functions, the debug functionality of the microprocessors requires the microprocessors to suspend normal operation and enter into a special debug exception routine. During the debug exception routine, the microprocessors do not function as they would during normal operation and, therefore, the failures in circuitry or software may not occur in a similar manner. Consequently, the external user will not be able to verify and isolate a root cause of the failures in either microprocessor when the real-time failing conditions do not actually occur.
Furthermore, both the i960 Jx microprocessor and the 80486 microprocessor require either an internal software debug program which is executed by the microprocessor to provide program control during the breakpoint and trace functions. The use of such debug control provides a very intrusive manner of debugging which requires a significant amount of overhead. As well, the use of debug software may not provide a true reflection of a faulty circuit or sequence in the failing microprocessor.
Therefore, a need exists for a data processor which provides both real time trace and real time debug functions. If both the trace and debug functions are executed in a manner which reflects operation of the data processor during normal operation, and not in a special debug mode of operation, the external user will more accurately identify and correct failures in the circuitry and software of the data processor.